package com.sun.androidexerciseproject.function.model.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.sun.androidexerciseproject.function.model.greendao.MsgModel;

import com.sun.androidexerciseproject.function.model.greendao.MsgModelDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig msgModelDaoConfig;

    private final MsgModelDao msgModelDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        msgModelDaoConfig = daoConfigMap.get(MsgModelDao.class).clone();
        msgModelDaoConfig.initIdentityScope(type);

        msgModelDao = new MsgModelDao(msgModelDaoConfig, this);

        registerDao(MsgModel.class, msgModelDao);
    }
    
    public void clear() {
        msgModelDaoConfig.clearIdentityScope();
    }

    public MsgModelDao getMsgModelDao() {
        return msgModelDao;
    }

}
